Adding remaining code