implemented parameter and pojo validation differently