fix functions declarations