fixs and optimization