Added comments and added the initialize function