basic works, minor bug present