added AGPL code