converted into npm module