added more flexibility