initial version with basic functions