added stack handler to check