Added Daniel Sieradski's changes