restructured createAccount, fixed search bug