added user id to logic