begin command implementation and server abstraction for testing