replaced def with explicit types