added status validation and wrote testing