Shortend Erland, C and Python Version