improvement and fixes