updated for better bcrypt support