coding finished for version 1.1