use doto macro instead of directly call method