generics were added where possible