fixed bugs
changed class for printing trace