added test, commented EVERYTHING