created dynamic layout with spinner