add "use warnings" and fix warnings