simplified int, improved counting and added a few more features