Wrote implementation stuff