add function partically works, needs support for negatives
add function critical error