parameter GUI code improved and refactored