Started to implement Repacking function