implemented required methods for step 2