added edge weights and edge parsing. untested parser