little derp in writing the right function down