Refactored to use SpacePen