almost done! need to do some more checking