made css generating an internal function