move declaration to its right place