bug fix + removing logging