adding front lock logic