i hope this works
big pile of code