tested shell function