add theory from Markin

bad code