Patches to get the basic funtion workin