add and fix function