blap unused function
use function call rather than pipe for clarity
add function guards