added optional types on functions