Enhanced Step function