better Subquerys for better errorhandling