refactored setEffect method