switched to k&r second edition function problem