add prev and next buttons to gallery