Updated code to v.1000 (previous: 993b)