added error displaying