Refactored with form