some modification on js