2 func to db,login 10%