rewtite build stylesheet function