slight js edit, added constants