added status update function