editted code to remove comments, odd naming