JS modified for Paste