Finished first version, not working for now