docstring added to serialize_command
Unit tests updated