final spec prototype implementation