updated after debugging 5/3/14