add generic type to remove all the warnings