First part of assignment 2