reworked requirements and polished main