updated to allow more settings