added append functionality and fixed bug with data access for paint events