Finished (almost) version