cleaned up update sql