better separation of sample code