added sir function