added some tmp stuff, need to sort