implemented JSON serialization and some user commands