Improving implementation with not need of form and just using a class