Exercise 1: improved release() and dock()