changed lcfirst to ucfirst
added more dynamic type for collection