updated code from our zumy repository