added release functionality and tests for release method