worked around the possibility of non-existent $_POST data