added gui functionality, still have to write rules