codebase cleanup
add inputbuffer