Added async/sync option