fixed function names
initial version