Finished the a preliminary method, with some errors that still need to be worked out