switch to typeof and all possibile inputs