added simple sort method, other minor improvements