added code to determine which independents affect which atomic functions
added some documentation