Added argument passing for flexibility