add checkPassword helper method