worked on new fix function