updated code to nougat