updated buttons & lock logic