finished manual conversion from erb to haml