Remove print_r
Use isset to check key existance