Appended changes by Marcin