updated main function for 3-3 pattern separation