Function within find command works, now make it functional