Added specifications for functions