made buildeMode part maybe, various handlers neccesary and optimizing