1st part solution