working, still have to fix offset issue