Adding stack handler