first edit - finish the basic coding