bug in int(data) repaired: changed to array(data,int)