defined a function instead of explicit implementations