clean code and add license