Separated logic, created a function to return the password