Reconfigurable all-optical logic gate based on a single SOA with improved dynamics