improved license detector