improved performance reducing number of sql requests, added colors