adds helper functions for calculating targeting