added graph functions and started transpose