modified a couple of my methods and added comments