moved code over from master on android project