replaced the bool cast to simple string comarison