implemented truncation and capping with regards to binary length