using getItem instead of get in sample