simpler in c?