added handling of binary result