algorithm and virutal function at syntax