kishore's submissions for second problem