helper for setting images