added features, see main.c