fixed a bug and made it print