reworking functions to match shudders file