added a function to uncompress positions