loooong explanation of what this is all meant to do