code from android course 2012, not used in later years, subject's dropped