Added foreign keys
methods for calculations