implement suggestions from will, haven't started debugging