Add types to functions