change addbrightnes function to use js objects instead of strings