testing using functions