runable version.. .but not finished