simplified, unnecessary stuff removed