added my changes to yason whilst keeping to original api