added password match function