Added restricted size functionality

TODO: Check this