testing functions logic