Updated code for android