added some more code. Yet not finished.