Implement functionality specified in tests