code for processing for a single obstalce