created function

created function and console log to test