fixed console and updated tests