fixed some bugs =) and did the thing