beautified the methods