Finally has some working functions ...