put to function