cleaned up enscrps functions