separate realized and unrealized gain