hopefully final version

hope this works correctly