better implementation
little bit of prints