implemented complete button click listener