further rejiggering of update function.... i kind of hate this so far :P