preparing for stdin and server support