operations 1-4 now works (more or less)