smoothed out some functionality