cleaned up a bit interaction code