final version

bugs fix