cleaned up prints with printf's instead of cout's