added initial codes (not complete)