Commented out certain parts to generalize things a bit