fixing bugs and specs