refactored for more code reuse in constellation