Rudimentary implementation, most likely incorrect at this time