made more generic and has stupid debugging statements
colors fixed