refactor transfer to function
added multi command option