changed paste from clipboard logic