implementing stall logic