switched from using constant magic look up values to calculated values look up values