fix bugs and add more specs