made userId optional