basic functionality done. need to implement difficult things.