got shit working, now fixing memory issues