cleaned up the anchor point code a bit