almost done, needs work on grphical interface