Reviewed the code and added some methods