fixed missing caption
centered caption
code clean-up