refactored for 0.12 release