calculating everything in one go
calculating everything in one go