Alam's submissions for second problem