as js, having trouble embedding as a nested library