aded text, fixed check, added main