implemented basic functionality without states