make finish function usable in commandhandlers