Removed unnecesary code from sample