placed script at top and reinvent.