Finished up the changes

need to test it