updated code for melon UI