updated parse function, added computational part