added some code, not all though. More asap.