Performance boost by calculating stuff only as necessary