fixing based on Kyle's suggestions