code finalized for submit