moved to using dictionary