finish implementing prototype