implementation and tests for `get/2`