added tests and return statements to commands