added framing code for sparkle feature