unused functions
replaced with simple math structures