removed all ending php tags to brevent output errors, also replaced echo with print