replaced q.fin() with finally()
get column type