refactor paste