fixing  ordering   problem