printing result

printed to console and alert