calculateand