remove whitespaces
refactored configuration to allow for key to be passed in directly