created test and fixed some bug
Created Test and fixed some bug