added throw and error and using qs fcall