Function of left and right atrium