Modified for standalone operation