Finally have it working okay