implement all commands
add readline, add FIXME