added color handling and ajax setup