cleaned things up and added constants