Finished initial implementation