better code
work in progress