improved syntax + added tests + function call