added more test and comments