implemented 2 methods