sort prototypes + compilation errors i somehow missed