cleaned code, added print & printf instead of clucky puts