completed implementation of the spec