code assign and lock