bug fix and change the archtecture