Refactored to use ark