cleaned up updates code