last changes to obj fun