added function of relative value using virtual attribute
finished 165r