make functions compact