Added build solution function