added support for code pasting