basic implementation of q1-q3

Signed-off-by: Bartol Karuza <me@bartolkaruza.com>