Use specs in demo functions (demo.erl)