updated to work with latest idris