Worked on apply button functionality