Solution for first course project