changed some things around, no change in functionality