encapsulating side effects