Added print - fixed bugs