fixed some bugs and updated values