changed a few pages to return messages instead of open a new page