very rough implementation of ln