more coding and debug