Adding calsum function