A little messy but appears to work