yeah, so basically that's the correct usage of custom commands, to reuse some piece of steps by calling a single function. A little advice, try to not overengineer it. Not saying it's an issue in your case but I've seen a lot of complex and general usage commands that were very difficult to maintain and debug later on.