doc block changes mostly and the costs select query is broken