Finished basic implementation