changed deque to vector for entity_cap, implemented function to handle all rate vectors, like Adam suggested :)