improved render method
fixed some bug
improved grunt and api