refactor and back to prawn