-- finished code and tests for listing entities