corrected flush
added REPL-Client for testing