added constants where appropriate