improve and fix