redeclaring function fix