Modified to latest changes