made some hard coded codes to be configurable