emul: start to implement this feature