still not completely done. but functional.