very messy simple version works