some more work, some more api functions implemented