Updating code to use pageobject