Version 'from shelve', need to complete it asap (remarks in the end of file)