some client side validation with ajax added, but still needs to be refactored ... currently will result too much duplicates