improved version of fixed2free with testing