used astyle to format nicer