updated function for theme feature, renamed params