Updated to work standalone