cleaned up and added hints