improved the custom activity